package test.pcs;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.payment.lc.pcs.client.wrap.bo.ProductionTimeAttributes;
import com.payment.lc.pcs.client.wrap.bo.ProductionValueAttributes;
import com.payment.lc.pcs.client.wrap.model.ZiGuanTime;
import com.payment.lc.pcs.client.wrap.service.ProductionWrapService;
import com.payment.lc.pcs.common.enums.n.MiProductMainCategory;
import com.payment.lc.pcs.service.api.DynamicDataService;
import com.payment.lc.pcs.service.api.ProductionService;
import com.payment.lc.pcs.service.api.nocache.PcsQueryService;
import com.payment.lc.pcs.service.bo.ProductionSellInfo;
import com.payment.lc.pcs.service.bo.ProductionSellInfoV2;
import com.payment.lc.pcs.service.domain.Production;
import com.payment.lc.pcs.service.request.GetProductsReq;
import com.payment.lc.pcs.service.response.PcsCommonPageResp;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import test.BaseTest;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created on 2016/8/8.
 */
public class Demo2PcsTest1214 extends BaseTest {

    @Autowired
    PcsQueryService pcsQueryService;

    @Autowired
    ProductionService productionService;

    @Autowired
    ProductionWrapService productionWrapService;

    @Autowired
    DynamicDataService dynamicDataService;

    @Test
    public void test() {
        test3();
//        test2();
//        test9();
    }

    void test3() {
        ProductionSellInfoV2 sellInfo = dynamicDataService.getProductionSellInfoV2("JM001709");
        display(sellInfo);
    }
    void test2() {
//        String prodCode = "FI16021";
        String prodCode = "SU1140";
//        Production production = productionService.getProduction(prodCode);
        Production p = new Production();
        p.setProductionCode(prodCode);
        ProductionTimeAttributes pt = productionWrapService.getProductionTimeAttributes(p);
        display(JSON.toJSONString(pt, SerializerFeature.WriteDateUseDateFormat));
    }

}